package com.ruoyi.passengers.service.impl;

import java.util.List;
import com.ruoyi.common.core.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.passengers.mapper.PassengerWalletsMapper;
import com.ruoyi.passengers.domain.PassengerWallets;
import com.ruoyi.passengers.service.IPassengerWalletsService;

/**
 * 乘客钱包Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-08-17
 */
@Service
public class PassengerWalletsServiceImpl implements IPassengerWalletsService 
{
    @Autowired
    private PassengerWalletsMapper passengerWalletsMapper;

    /**
     * 查询乘客钱包
     * 
     * @param id 乘客钱包主键
     * @return 乘客钱包
     */
    @Override
    public PassengerWallets selectPassengerWalletsById(Long id)
    {
        return passengerWalletsMapper.selectPassengerWalletsById(id);
    }

    /**
     * 查询乘客钱包列表
     * 
     * @param passengerWallets 乘客钱包
     * @return 乘客钱包
     */
    @Override
    public List<PassengerWallets> selectPassengerWalletsList(PassengerWallets passengerWallets)
    {
        return passengerWalletsMapper.selectPassengerWalletsList(passengerWallets);
    }

    /**
     * 新增乘客钱包
     * 
     * @param passengerWallets 乘客钱包
     * @return 结果
     */
    @Override
    public int insertPassengerWallets(PassengerWallets passengerWallets)
    {
        passengerWallets.setCreateTime(DateUtils.getNowDate());
        return passengerWalletsMapper.insertPassengerWallets(passengerWallets);
    }

    /**
     * 修改乘客钱包
     * 
     * @param passengerWallets 乘客钱包
     * @return 结果
     */
    @Override
    public int updatePassengerWallets(PassengerWallets passengerWallets)
    {
        return passengerWalletsMapper.updatePassengerWallets(passengerWallets);
    }

    /**
     * 批量删除乘客钱包
     * 
     * @param ids 需要删除的乘客钱包主键
     * @return 结果
     */
    @Override
    public int deletePassengerWalletsByIds(Long[] ids)
    {
        return passengerWalletsMapper.deletePassengerWalletsByIds(ids);
    }

    /**
     * 删除乘客钱包信息
     * 
     * @param id 乘客钱包主键
     * @return 结果
     */
    @Override
    public int deletePassengerWalletsById(Long id)
    {
        return passengerWalletsMapper.deletePassengerWalletsById(id);
    }
}
